/*
 * @Description: 
 * @Author: yeeChen
 * @Date: 2022-12-13 16:06:45
 * @LastEditTime: 2022-12-13 16:14:08
 * @LastEditors: yeeChen
 */
const fs = require('fs')
fs.readFile('./成绩.txt', 'utf8', function (err, dataStr) {
    if (err) {
        return console.log('读取失败'+err.message);
    }
    // console.log('读取文件成功'+ dataStr);
    const arrOld = dataStr.split(' ')
    const arrNew = []
    arrOld.forEach(item => {
        arrNew.push(item.replace('=',': '))
    })
    const newStr =arrNew.join('\r\n')

fs.writeFile('./files/成绩-ok.txt', newStr, function (err) {
    if (err) {
        return console.log('写入失败'+err.message);
    }            
    console.log('写入成功');
})
})